<?php

class Application_Form_AddToGroup extends Zend_Form
{
    public function init() {
        $this->addElement('radio', 'group', array(
            'label'         => 'Group:',
            'required'      => true,
        ));

        $db = new Application_Model_GroupMapper();
        $groups = $db->fetchAll();
        if($groups != null) {
            foreach ($groups as $group) {
                $this->group->addMultiOption($group->id(), $group->name());
            }
        }
    }
}

